<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
    "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="generator" content="AsciiDoc 8.2.7" />
<style type="text/css">
/* Debug borders */
p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
/*
  border: 1px solid red;
*/
}

body {
  margin: 1em 5% 1em 5%;
}

a {
  color: blue;
  text-decoration: underline;
}
a:visited {
  color: fuchsia;
}

em {
  font-style: italic;
  color: navy;
}

strong {
  font-weight: bold;
  color: #083194;
}

tt {
  color: navy;
}

h1, h2, h3, h4, h5, h6 {
  color: #527bbd;
  font-family: sans-serif;
  margin-top: 1.2em;
  margin-bottom: 0.5em;
  line-height: 1.3;
}

h1, h2, h3 {
  border-bottom: 2px solid silver;
}
h2 {
  padding-top: 0.5em;
}
h3 {
  float: left;
}
h3 + * {
  clear: left;
}

div.sectionbody {
  font-family: serif;
  margin-left: 0;
}

hr {
  border: 1px solid silver;
}

p {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

ul, ol, li > p {
  margin-top: 0;
}

pre {
  padding: 0;
  margin: 0;
}

span#author {
  color: #527bbd;
  font-family: sans-serif;
  font-weight: bold;
  font-size: 1.1em;
}
span#email {
}
span#revision {
  font-family: sans-serif;
}

div#footer {
  font-family: sans-serif;
  font-size: small;
  border-top: 2px solid silver;
  padding-top: 0.5em;
  margin-top: 4.0em;
}
div#footer-text {
  float: left;
  padding-bottom: 0.5em;
}
div#footer-badges {
  float: right;
  padding-bottom: 0.5em;
}

div#preamble,
div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
div.admonitionblock {
  margin-right: 10%;
  margin-top: 1.5em;
  margin-bottom: 1.5em;
}
div.admonitionblock {
  margin-top: 2.5em;
  margin-bottom: 2.5em;
}

div.content { /* Block element content. */
  padding: 0;
}

/* Block element titles. */
div.title, caption.title {
  color: #527bbd;
  font-family: sans-serif;
  font-weight: bold;
  text-align: left;
  margin-top: 1.0em;
  margin-bottom: 0.5em;
}
div.title + * {
  margin-top: 0;
}

td div.title:first-child {
  margin-top: 0.0em;
}
div.content div.title:first-child {
  margin-top: 0.0em;
}
div.content + div.title {
  margin-top: 0.0em;
}

div.sidebarblock > div.content {
  background: #ffffee;
  border: 1px solid silver;
  padding: 0.5em;
}

div.listingblock {
  margin-right: 0%;
}
div.listingblock > div.content {
  border: 1px solid silver;
  background: #f4f4f4;
  padding: 0.5em;
}

div.quoteblock {
  padding-left: 2.0em;
}
div.quoteblock > div.attribution {
  padding-top: 0.5em;
  text-align: right;
}

div.verseblock {
  padding-left: 2.0em;
}
div.verseblock > div.content {
  white-space: pre;
}
div.verseblock > div.attribution {
  padding-top: 0.75em;
  text-align: left;
}
/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
div.verseblock + div.attribution {
  text-align: left;
}

div.admonitionblock .icon {
  vertical-align: top;
  font-size: 1.1em;
  font-weight: bold;
  text-decoration: underline;
  color: #527bbd;
  padding-right: 0.5em;
}
div.admonitionblock td.content {
  padding-left: 0.5em;
  border-left: 2px solid silver;
}

div.exampleblock > div.content {
  border-left: 2px solid silver;
  padding: 0.5em;
}

div.imageblock div.content { padding-left: 0; }
div.imageblock img { border: 1px solid silver; }
span.image img { border-style: none; }

dl {
  margin-top: 0.8em;
  margin-bottom: 0.8em;
}
dt {
  margin-top: 0.5em;
  margin-bottom: 0;
  font-style: normal;
}
dd > *:first-child {
  margin-top: 0.1em;
}

ul, ol {
    list-style-position: outside;
}
div.olist > ol {
  list-style-type: decimal;
}
div.olist2 > ol {
  list-style-type: lower-alpha;
}

div.tableblock > table {
  border: 3px solid #527bbd;
}
thead {
  font-family: sans-serif;
  font-weight: bold;
}
tfoot {
  font-weight: bold;
}

div.hlist {
  margin-top: 0.8em;
  margin-bottom: 0.8em;
}
div.hlist td {
  padding-bottom: 15px;
}
td.hlist1 {
  vertical-align: top;
  font-style: normal;
  padding-right: 0.8em;
}
td.hlist2 {
  vertical-align: top;
}

@media print {
  div#footer-badges { display: none; }
}

div#toctitle {
  color: #527bbd;
  font-family: sans-serif;
  font-size: 1.1em;
  font-weight: bold;
  margin-top: 1.0em;
  margin-bottom: 0.1em;
}

div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
  margin-top: 0;
  margin-bottom: 0;
}
div.toclevel2 {
  margin-left: 2em;
  font-size: 0.9em;
}
div.toclevel3 {
  margin-left: 4em;
  font-size: 0.9em;
}
div.toclevel4 {
  margin-left: 6em;
  font-size: 0.9em;
}
/* Workarounds for IE6's broken and incomplete CSS2. */

div.sidebar-content {
  background: #ffffee;
  border: 1px solid silver;
  padding: 0.5em;
}
div.sidebar-title, div.image-title {
  color: #527bbd;
  font-family: sans-serif;
  font-weight: bold;
  margin-top: 0.0em;
  margin-bottom: 0.5em;
}

div.listingblock div.content {
  border: 1px solid silver;
  background: #f4f4f4;
  padding: 0.5em;
}

div.quoteblock-attribution {
  padding-top: 0.5em;
  text-align: right;
}

div.verseblock-content {
  white-space: pre;
}
div.verseblock-attribution {
  padding-top: 0.75em;
  text-align: left;
}

div.exampleblock-content {
  border-left: 2px solid silver;
  padding-left: 0.5em;
}

/* IE6 sets dynamically generated links as visited. */
div#toc a:visited { color: blue; }

/* Because IE6 child selector is broken. */
div.olist2 ol {
  list-style-type: lower-alpha;
}
div.olist2 div.olist ol {
  list-style-type: decimal;
}
</style>
<title>Manual of the Ector program</title>
</head>
<body>
<div id="header">
<h1>Manual of the Ector program</h1>
<span id="author">author parmentierf@users.sourceforge.net</span><br />
<span id="revision">version 0.2,</span>
2008-11-11
</div>
<h2 id="_introduction">Introduction</h2>
<div class="sectionbody">
<div class="para"><p>Ector.py is the python module which contains the Ector class, but also the main
program to use Ector.</p></div>
<div class="para"><p>This page explains how to use this program.</p></div>
</div>
<h2 id="_run_it">Run it</h2>
<div class="sectionbody">
<div class="para"><p>src/Ector.py is to be launched by typing this (provided that Python 2.5+ is
installed on your system) in a shell, in the root directory of the pyector
project:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>python src/Ector.py</tt></pre>
</div></div>
<h3 id="_options">Options</h3><div style="clear:left"></div>
<div class="para"><p>There are several options you can use.</p></div>
<div class="para"><p>Here is the synopsis of the command (version 0.2):</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>python Ector.py [-p username=User][-n botname=Ector][-l logfilepath=ector.log][-h]</tt></pre>
</div></div>
<h4 id="_p_8212_person">p &#8212;person</h4>
<div class="para"><p>This option gives the user name to Ector.
It is the name under which you are recognized by Ector.
It will be used to create a file <tt>username_state.pkl</tt> in which it will save the
last subjects you talk about (to simplify).</p></div>
<div class="para"><p>When you talk to Ector, you are named <tt>username</tt>, and nothing else. Don't use
other pseudos or nicknames.
The username is displayed before the prompt, so that you always know what's your
name ;)</p></div>
<div class="para"><p>By default, it is <strong><tt>User</tt></strong>.</p></div>
<div class="para"><p>You can always change this name during the interactive session by using the
<tt>@person</tt> command:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>User&gt;@person Bill
Bill&gt;</tt></pre>
</div></div>
<h4 id="_n_8212_name">n &#8212;name</h4>
<div class="para"><p>You can change the name of the bot, but its default name will be <strong><tt>Ector</tt></strong>.
The name you give is capitalized.</p></div>
<h4 id="_l_8212_log">l &#8212;log</h4>
<div class="para"><p>You can change the file in which the log is written.
By default, the file is <tt>ector.log</tt> and is saved in the current directory (from
where you launch Ector).</p></div>
<div class="para"><p>This is the same as the <tt>@log</tt> command.</p></div>
<h4 id="_h_8212_help">h &#8212;help</h4>
<div class="para"><p>The help option reminds the usage of the program:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>$python src/Ector.py -h
Usage: Ector.py [-p username][-n botname=Ector][-v|-q][-l logfilepath=ector.log]
[-s|-g][-h]

Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  -p USERNAME, --person=USERNAME
                        set the name of the utterer
  -n BOTNAME, --name=BOTNAME
                        set the name of the bot
  -v                    say all that you can say
  -q                    shut up!
  -l LOGNAME, --log=LOGNAME
                        log the dialogue in log file</tt></pre>
</div></div>
<div class="para"><p>Although some options are already present, they are not functional: -v, -q are
not applicable, as Ector does not answer, even in version 0.2.</p></div>
<h3 id="_use_it">Use it</h3><div style="clear:left"></div>
<div class="para"><p>Once you have launch the program, you get some license and copyright information:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>$ python src/Ector.py
pyECTOR version 0.2, Copyright (C) 2008 Francois PARMENTIER
pyECTOR comes with ABSOLUTELY NO WARRANTY; for details type `@show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `@show c' for details.
@help gives a basic help on pyECTOR commands.
User&gt;</tt></pre>
</div></div>
<div class="para"><p>From there, you can either type sentences you want Ector to learn, or use some
commands.
Let's see these commands.</p></div>
<h4 id="_help">@help</h4>
<div class="para"><p>Typing <tt>@help</tt>, then enter will display all available commands:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>User&gt;@help
You can just start typing phrases.
But there are some commands you can use:
 - @usage     : print the options of the Ector.py command
 - @quit      : quit
 - @exit      : quit
 - @bye       : quit
 - @person    : change the utterer name (like -p)
 - @name      : change the bot's name (like -n)
 - @version   : give the current version
 - @write     : save Ector's Concept Network and state
 - @shownodes : show the nodes of the Concept Network
 - @showlinks : show the links of the Concept Network
 - @log [file]: log the entries in the file (no file turns off the logging)
 - @status    : show the status of Ector (Concept Network, states)
User&gt;</tt></pre>
</div></div>
<h4 id="_usage">@usage</h4>
<div class="para"><p>Usage is the same than <tt>-h, &#8212;help</tt> option. It gives the synopsis of the program.</p></div>
<h4 id="_quit_exit_bye">@quit, @exit, @bye</h4>
<div class="para"><p><tt>@quit</tt>, <tt>@exit</tt>, and <tt>@bye</tt> are the same command: it is the only means to quit Ector.</p></div>
<div class="para"><p><strong>Warning</strong>: at this point, if you did not save the ConceptNetwork (using <tt>@write</tt>), all you said since the last save will be lost!</p></div>
<h4 id="_person">@person</h4>
<div class="para"><p>The <tt>@person</tt> command let you change your name in the course of the interactive
session:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>User&gt;@person Bill
Bill&gt;</tt></pre>
</div></div>
<div class="para"><p><strong>Warning</strong>: at this point, if you did not save, Ector won't remember your last
conversation state the next time you return as <tt>User</tt>.</p></div>
<h4 id="_name">@name</h4>
<div class="para"><p>The <tt>@name</tt> command let you change the name of the bot, so that when you say
this new name, the bot knows it is him.</p></div>
<div class="para"><p><strong>Tip</strong>: don't use this command too much, except if you want to call the bot
another name than "Ector".</p></div>
<h4 id="_version">@version</h4>
<div class="para"><p>Gives the current version of the program. :)</p></div>
<h4 id="_write">@write</h4>
<div class="para"><p>Writes the ConceptNetwork in <tt>cn.pkl</tt>, in the current directory, <strong>and</strong> the
ConceptNetworkState in <tt>username_state.pkl</tt>, in the same directory.</p></div>
<h4 id="_shownodes">@shownodes</h4>
<div class="para"><p>This command displays the nodes of the ConceptNetwork, as in the
ConceptNetworkModule.</p></div>
<div class="para"><p>This won't display anything unless there are nodes in the ConceptNetwork.
A simple manner to add nodes, is to talk to Ector, naturally.</p></div>
<div class="para"><p>Example:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>User&gt;Hi Ector, how are you?
User&gt;@shownodes
       how (   token): 1 (0,1,0)
        Hi (   token): 1 (1,0,0)
Hi @bot@, how are you? (sentence): 1 (1)
       bot (   token): 1 (0,1,0)
         , (   token): 1 (0,1,0)
      User ( utterer): 1 (2008/11/11)
         ? (   token): 1 (0,0,1)
       are (   token): 1 (0,1,0)
       you (   token): 1 (0,1,0)
User&gt;</tt></pre>
</div></div>
<div class="para"><p><strong>Warning</strong>: this could overwhelm the screen, if your ConceptNetwork is already
big!</p></div>
<div class="para"><p><strong>Note</strong>: at the launch, Ector try to read the <tt>cn.pkl</tt> file. If you already wrote
it, the ConceptNetwork shall not be empty.</p></div>
<h4 id="_showlinks">@showlinks</h4>
<div class="para"><p>This command displays the links of the ConceptNetwork, like in
ConceptNetworkModule.</p></div>
<div class="para"><p>Though it is useful to debug and understand how Ector works, you should not use
it, as the output is long.</p></div>
<div class="para"><p>Example:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>User&gt;Hi Ector, how are you?
User&gt;@showlinks
       bot ------(100)-------&gt; Hi @bot@, how are you?
         , ------(100)-------&gt;        how
       how ------(100)-------&gt;        are
Hi @bot@, how are you? ------(100)-------&gt;          ,
       how ------(100)-------&gt; Hi @bot@, how are you?
Hi @bot@, how are you? ------(100)-------&gt;         Hi
        Hi ------(100)-------&gt;        bot
Hi @bot@, how are you? ------(100)-------&gt;        you
       are ------(100)-------&gt; Hi @bot@, how are you?
         ? ------(100)-------&gt; Hi @bot@, how are you?
Hi @bot@, how are you? ------(100)-------&gt;          ?
Hi @bot@, how are you? ------(100)-------&gt;        bot
        Hi ------(100)-------&gt; Hi @bot@, how are you?
Hi @bot@, how are you? ------(100)-------&gt;        are
       bot ------(100)-------&gt;          ,
       are ------(100)-------&gt;        you
         , ------(100)-------&gt; Hi @bot@, how are you?
       you ------(100)-------&gt; Hi @bot@, how are you?
Hi @bot@, how are you? ------(100)-------&gt;        how
      User ------(100)-------&gt; Hi @bot@, how are you?
Hi @bot@, how are you? ------(100)-------&gt;       User
       you ------(100)-------&gt;          ?
User&gt;</tt></pre>
</div></div>
<h4 id="_log">@log</h4>
<div class="para"><p>This command change the way the log is taken, in two manners:</p></div>
<div class="olist"><ol>
<li>
<p>
change the file in which the log is automatically written
</p>
</li>
<li>
<p>
stop the logging, giving no filename, or using <tt>@logoff</tt>
</p>
</li>
</ol></div>
<div class="para"><p>Example:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>User&gt;@log
Log off (ector.log)</tt></pre>
</div></div>
<div class="para"><p>The logging off display the last log file name.</p></div>
<div class="para"><p>To log on, or change the name of the log:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>User&gt;@log test.log
Log file: test.log</tt></pre>
</div></div>
<h4 id="_status">@status</h4>
<div class="para"><p>The status command display the nodes of the ConceptNetwork, and the name of the
states that were created:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>User&gt;@status
       how (   token): 1 (0,1,0)
        Hi (   token): 1 (1,0,0)
Hi @bot@, how are you? (sentence): 1 (1)
       bot (   token): 1 (0,1,0)
         , (   token): 1 (0,1,0)
      User ( utterer): 1 (2008/11/11)
         ? (   token): 1 (0,0,1)
       are (   token): 1 (0,1,0)
       you (   token): 1 (0,1,0)
States (1)
        User</tt></pre>
</div></div>
</div>
<div id="footer">
<div id="footer-text">
Version 0.2<br />
Last updated 2008-11-11 16:46:56
</div>
</div>
</body>
</html>
